package rnClasses;

import java.io.File;

import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JTextField;

public class Contador {

	private String dir ;
	
	private String loc = String.valueOf(0);
	
	private String classes = String.valueOf(0);
	
	private JLabel label = new JLabel ("teste");
	
	public JLabel getLabel() {
		return label;
	}

	public void setLabel(JLabel label) {
		this.label = label;
	}
	
	public final String getClasses() {
		return classes;
	}

	public final void setClasses(String classes) {
		this.classes = classes;
	}

	public final String getLoc() {
		return loc;
	}

	public final void setLoc(String loc) {
		this.loc = loc;
	}

	public final String getDir() {
		return dir;
	}

	public final void setDir(String dir) {
		this.dir = dir;
	}

	public Contador() {
		// TODO Auto-generated constructor stub
	}

	public void calculaLoc (JTextField baseDirPath){
		JFileChooser fileChooser = new JFileChooser ();
		fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
		fileChooser.setCurrentDirectory(new File ("C:/Documents and Settings/User/workspace/VDLFramework"));
		fileChooser.showDialog(null, "OK");		
		loc= ContarLinhas.getLinhas(fileChooser.getSelectedFile());
		classes = String.valueOf(ContarLinhas.getClassNumber());
		baseDirPath.setText(fileChooser.getSelectedFile().getName());
	}
	
}
